{% extends "@CoreBundle/layout/pop.html.twig" %}

{% block head_javascript %}
    {{ parent() }}
{% endblock %}

{% block page_title %}视频管理{% endblock %}
{% block breadcrumb %}
    <li class="breadcrumb-item"><a href="{{ path("admin_teach_course_index") }}">课程管理</a></li>
    <li class="breadcrumb-item"><a href="{{ path("admin_teach_chapter_index", {"id":id}) }}">章节管理</a></li>
{% endblock %}

{% block page %}
<div class="card">
    <form method="POST" action="{{ path("admin_api_teach_chapter_live", {id:id}) }}" class="form-horizontal ajaxform needs-validation" accept-charset="UTF-8" novalidate >
        {% if pushUrl %}
        <div class="card-body" style="display: block;">
        推流地址: <code class="clipboard" data-clipboard-text="{{ pushUrl }}" >{{ pushUrl|raw }}</code>
        </div>
        {% endif %}
        <div class="card-footer">
            <div class="col-md-2"></div>
            <div class="col-md-8">
                <div class="btn-group">
                    <button type="submit" class="btn btn-sm btn-info " style="margin-right: 10px;"><i class="mdi mdi-arrow-up"></i> {% if pushUrl is empty %}生成直播数据{% else %}重新生成直播数据 {% endif %}</button>
                </div>
            </div>
        </div>
    </form>
</div>
{% endblock %}
